/**
 * Created by brantyan on 14-1-16.
 */
//Template1
angular.module('pony',['ngResource'])
       .controller('PonyCtrl',function($scope,$resource){

        $scope.isRevealed=true;

        $scope.pony={
            name: "Doug111",
            imageUrl: "/images/ajax-loader.gif"
        }

        var PonyResource =  $resource('/rest/pony/best');

        $scope.onClick =function(){
            var pony = PonyResource.get(function(){
                $scope.isRevealed = true;
                $scope.pony = pony;

            });
        };
    });